#include "fxcc/yml/Serializer.h"
#include "fxcc/core/audio/common/AudioMetaCacheFile.h"

template<>
void fxcc::yml::Serializer::Encode<AudioMetaCacheFile>(YAML::Node& node, const AudioMetaCacheFile& inst)
{
	SetMapVariableKeyFilter<AudioMetaCache>(node, "m_AudioMetaCaches", inst.m_AudioMetaCaches, [&](const AudioMetaCache& inst) {return true; }, [&](const std::string& key) {return fs::exists(key); });
}


template<>
bool fxcc::yml::Serializer::Decode<AudioMetaCacheFile>(const YAML::Node& node, AudioMetaCacheFile& inst)
{
	GetMapVariable<AudioMetaCache>(node, "m_AudioMetaCaches", inst.m_AudioMetaCaches);
	return true;
}